package com.woniuxy.stall.feign;

import com.woniuxy.core.model.GetOrdersByStallIdAndTimeForm;
import com.woniuxy.core.model.Result;
import com.woniuxy.order.dao.OrderInfo;
import com.woniuxy.stall.dao.StallInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Set;

@FeignClient(name = "order-server")
@ComponentScan
public interface OrderClient {

    @PostMapping("/order/orderInfo/getOrderInfosByStallIds")
    Result<List<OrderInfo>> getOrderInfosByStallIds(@RequestBody Set<Integer> stallIds);
    @PostMapping("/order/orderInfo/getOrdersByStallIdAndTime")
    List<OrderInfo> getOrdersByStallIdAndTime(@RequestBody GetOrdersByStallIdAndTimeForm form);
}
